package com.example.cmtwo.service;

import com.example.cmtwo.bean.Userinformation;
import com.example.cmtwo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedList;
import java.util.List;

@Service
public class AdminUserinformationservice {

    @Autowired
    private UserMapper userMapper;

    public List<Userinformation> getUserinformationByall()
    {
        List<Userinformation> uif = new LinkedList<Userinformation>();
        try {
            uif = userMapper.findalluserinformation();
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
            return uif;
        }
        return uif;
    }
}
